package com.briup.day10;

import com.briup.day10.poly.Circle;
import com.briup.day10.poly.Point;
import com.briup.day10.poly.TCircle;

public class Test_Poly {
    public static void main(String[] args) {
        /*
        多态前提
        1.子类继承父类
        2.子类重写父类中方法
        3.父类引用指向子类对象
        */
        Point p = new Circle(1, 1, 2);
        p.show();
        //访问不到子类的特有成员，尽管他是public
        System.out.println("-------------------------");
        Point p2=new TCircle(10,10,20,20);
        p2.show();
    }
}
